{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "MlcoQT90gb9-"
   },
   "source": [
    "# Reddit Search Analysis Agents\n",
    "\n",
    "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/notebooks/reddit_search_analysis_agents.ipynb)\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "-jcPvvOagb-A"
   },
   "source": [
    "## Dependencies"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "R7eG0LwUgb-B"
   },
   "outputs": [],
   "source": [
    "# Install dependencies without output\n",
    "%pip install langchain_community > /dev/null\n",
    "%pip install praisonai[crewai] > /dev/null\n",
    "%pip install duckduckgo_search > /dev/null"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "jjwOMpWEgb-C"
   },
   "source": [
    "## Tools"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "id": "QQoq4jT_gb-D"
   },
   "outputs": [],
   "source": [
    "# ToDo: Reddit Search not shown as action in the output\n",
    "from langchain_community.tools import RedditSearchRun"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "lHh_R2Tngb-D"
   },
   "source": [
    "## YAML Prompt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "id": "W01IZZodgb-E"
   },
   "outputs": [],
   "source": [
    "agent_yaml = \"\"\"\n",
    "framework: \"crewai\"\n",
    "topic: \"research about the causes of lung disease\"\n",
    "roles:\n",
    "  research_analyst:\n",
    "    role: \"Research Analyst\"\n",
    "    backstory: \"Experienced in analyzing scientific data related to respiratory health.\"\n",
    "    goal: \"Analyze data on lung diseases\"\n",
    "    tasks:\n",
    "      data_analysis:\n",
    "        description: \"Gather and analyze data on the causes and risk factors of lung diseases.\"\n",
    "        expected_output: \"Report detailing key findings on lung disease causes.\"\n",
    "    tools:\n",
    "      - \"RedditSearchRun\"\n",
    "  medical_writer:\n",
    "    role: \"Medical Writer\"\n",
    "    backstory: \"Skilled in translating complex medical information into accessible content.\"\n",
    "    goal: \"Compile comprehensive content on lung disease causes\"\n",
    "    tasks:\n",
    "      content_creation:\n",
    "        description: \"Create detailed content summarizing the research findings on lung disease causes.\"\n",
    "        expected_output: \"Document outlining various causes and risk factors of lung diseases.\"\n",
    "    tools: []\n",
    "  editor:\n",
    "    role: \"Editor\"\n",
    "    backstory: \"Proficient in editing medical content for accuracy and clarity.\"\n",
    "    goal: \"Review and refine content on lung disease causes\"\n",
    "    tasks:\n",
    "      content_review:\n",
    "        description: \"Edit and refine the compiled content on lung disease causes for accuracy and coherence.\"\n",
    "        expected_output: \"Finalized document on lung disease causes ready for dissemination.\"\n",
    "    tools: []\n",
    "dependencies: []\n",
    "\"\"\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "EZ_s2mzfgb-E"
   },
   "source": [
    "## Main"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 1000
    },
    "id": "1nyhBMb6gb-F",
    "outputId": "57633d91-941e-48bb-d3d4-8ab42b2f52ca"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[1m\u001b[95m [2024-11-02 11:00:57][DEBUG]: == Working Agent: Research Analyst\u001b[00m\n",
      "\u001b[1m\u001b[95m [2024-11-02 11:00:57][INFO]: == Starting Task: Gather and analyze data on the causes and risk factors of lung diseases.\u001b[00m\n",
      "\n",
      "\n",
      "\u001b[1m> Entering new CrewAgentExecutor chain...\u001b[0m\n",
      "\u001b[32;1m\u001b[1;3mI now can give a great answer.  \n",
      "Final Answer: \n",
      "\n",
      "**Title: Comprehensive Analysis of the Causes and Risk Factors of Lung Diseases**\n",
      "\n",
      "**Introduction:**\n",
      "Lung diseases encompass a broad range of conditions affecting the lungs, including Chronic Obstructive Pulmonary Disease (COPD), asthma, lung cancer, pulmonary fibrosis, and pneumonia. Understanding the causes and risk factors associated with these diseases is essential for prevention, early detection, and effective management. This report synthesizes current scientific data to elucidate the major causes and risk factors contributing to lung diseases.\n",
      "\n",
      "**Key Findings:**\n",
      "\n",
      "1. **Environmental Factors:**\n",
      "   - **Air Pollution:** Exposure to pollutants such as particulate matter (PM), nitrogen dioxide (NO2), and sulfur dioxide (SO2) has been linked to an increased incidence of lung diseases, particularly asthma and COPD. Long-term exposure to high levels of air pollution can exacerbate pre-existing conditions and lead to the development of respiratory issues.\n",
      "   - **Tobacco Smoke:** Smoking is the leading cause of lung diseases, responsible for approximately 85% of lung cancer cases and a significant proportion of COPD cases. Secondhand smoke exposure also poses serious health risks, increasing the likelihood of asthma and respiratory infections in non-smokers.\n",
      "   - **Occupational Hazards:** Certain occupations expose individuals to harmful substances such as asbestos, silica, and coal dust, significantly increasing the risk of lung diseases, including pneumoconiosis and lung cancer. Workers in construction, mining, and manufacturing industries are particularly vulnerable.\n",
      "\n",
      "2. **Biological Factors:**\n",
      "   - **Genetics:** Genetic predisposition plays a role in an individual's susceptibility to lung diseases. Variants in genes associated with inflammation and immune response can influence the likelihood of developing conditions such as asthma and COPD.\n",
      "   - **Age and Gender:** Aging is a significant risk factor for lung diseases due to the natural decline in lung function over time. Additionally, gender differences exist; for instance, men historically have higher rates of lung cancer, while women are increasingly affected, particularly non-smokers.\n",
      "\n",
      "3. **Lifestyle Factors:**\n",
      "   - **Diet and Nutrition:** Poor diet, characterized by low intake of fruits and vegetables, has been associated with an increased risk of respiratory diseases. Antioxidants found in these foods may help protect lung tissue from damage.\n",
      "   - **Physical Inactivity:** Sedentary lifestyles contribute to obesity, which is a known risk factor for various lung conditions, including obstructive sleep apnea and asthma.\n",
      "\n",
      "4. **Infectious Agents:**\n",
      "   - **Viruses and Bacteria:** Respiratory infections from pathogens such as influenza, pneumonia-causing bacteria (e.g., Streptococcus pneumoniae), and viral infections (e.g., COVID-19) can lead to acute and chronic lung diseases. Severe infections can cause long-term lung damage, particularly in vulnerable populations.\n",
      "\n",
      "5. **Comorbidities:**\n",
      "   - **Chronic Conditions:** The presence of comorbidities such as obesity, diabetes, and cardiovascular diseases can exacerbate lung diseases and complicate their management. These conditions may contribute to inflammation and reduced lung function, leading to worse health outcomes.\n",
      "\n",
      "**Conclusion:**\n",
      "The causes and risk factors of lung diseases are multifaceted, involving a complex interplay between environmental, biological, lifestyle, infectious, and comorbid factors. Effective public health strategies must focus on reducing exposure to known risk factors, promoting healthy lifestyles, and enhancing surveillance and response to respiratory infections. Continued research is essential to deepen our understanding of these factors and to develop targeted interventions aimed at reducing the burden of lung diseases in the population. \n",
      "\n",
      "This comprehensive analysis serves as a foundation for further investigation into specific interventions and policies that can mitigate the impact of lung diseases on public health.\n",
      "\n",
      "**Recommendations:**\n",
      "- Implement stricter regulations on air quality and emissions.\n",
      "- Promote smoking cessation programs and awareness campaigns on the dangers of secondhand smoke.\n",
      "- Encourage occupational safety measures to protect workers from harmful exposures.\n",
      "- Advocate for public health initiatives focused on nutrition and physical activity.\n",
      "\n",
      "By addressing these key areas, we can work towards reducing the prevalence and impact of lung diseases in our communities.\u001b[0m\n",
      "\n",
      "\u001b[1m> Finished chain.\u001b[0m\n",
      "\u001b[1m\u001b[92m [2024-11-02 11:01:06][DEBUG]: == [Research Analyst] Task output: **Title: Comprehensive Analysis of the Causes and Risk Factors of Lung Diseases**\n",
      "\n",
      "**Introduction:**\n",
      "Lung diseases encompass a broad range of conditions affecting the lungs, including Chronic Obstructive Pulmonary Disease (COPD), asthma, lung cancer, pulmonary fibrosis, and pneumonia. Understanding the causes and risk factors associated with these diseases is essential for prevention, early detection, and effective management. This report synthesizes current scientific data to elucidate the major causes and risk factors contributing to lung diseases.\n",
      "\n",
      "**Key Findings:**\n",
      "\n",
      "1. **Environmental Factors:**\n",
      "   - **Air Pollution:** Exposure to pollutants such as particulate matter (PM), nitrogen dioxide (NO2), and sulfur dioxide (SO2) has been linked to an increased incidence of lung diseases, particularly asthma and COPD. Long-term exposure to high levels of air pollution can exacerbate pre-existing conditions and lead to the development of respiratory issues.\n",
      "   - **Tobacco Smoke:** Smoking is the leading cause of lung diseases, responsible for approximately 85% of lung cancer cases and a significant proportion of COPD cases. Secondhand smoke exposure also poses serious health risks, increasing the likelihood of asthma and respiratory infections in non-smokers.\n",
      "   - **Occupational Hazards:** Certain occupations expose individuals to harmful substances such as asbestos, silica, and coal dust, significantly increasing the risk of lung diseases, including pneumoconiosis and lung cancer. Workers in construction, mining, and manufacturing industries are particularly vulnerable.\n",
      "\n",
      "2. **Biological Factors:**\n",
      "   - **Genetics:** Genetic predisposition plays a role in an individual's susceptibility to lung diseases. Variants in genes associated with inflammation and immune response can influence the likelihood of developing conditions such as asthma and COPD.\n",
      "   - **Age and Gender:** Aging is a significant risk factor for lung diseases due to the natural decline in lung function over time. Additionally, gender differences exist; for instance, men historically have higher rates of lung cancer, while women are increasingly affected, particularly non-smokers.\n",
      "\n",
      "3. **Lifestyle Factors:**\n",
      "   - **Diet and Nutrition:** Poor diet, characterized by low intake of fruits and vegetables, has been associated with an increased risk of respiratory diseases. Antioxidants found in these foods may help protect lung tissue from damage.\n",
      "   - **Physical Inactivity:** Sedentary lifestyles contribute to obesity, which is a known risk factor for various lung conditions, including obstructive sleep apnea and asthma.\n",
      "\n",
      "4. **Infectious Agents:**\n",
      "   - **Viruses and Bacteria:** Respiratory infections from pathogens such as influenza, pneumonia-causing bacteria (e.g., Streptococcus pneumoniae), and viral infections (e.g., COVID-19) can lead to acute and chronic lung diseases. Severe infections can cause long-term lung damage, particularly in vulnerable populations.\n",
      "\n",
      "5. **Comorbidities:**\n",
      "   - **Chronic Conditions:** The presence of comorbidities such as obesity, diabetes, and cardiovascular diseases can exacerbate lung diseases and complicate their management. These conditions may contribute to inflammation and reduced lung function, leading to worse health outcomes.\n",
      "\n",
      "**Conclusion:**\n",
      "The causes and risk factors of lung diseases are multifaceted, involving a complex interplay between environmental, biological, lifestyle, infectious, and comorbid factors. Effective public health strategies must focus on reducing exposure to known risk factors, promoting healthy lifestyles, and enhancing surveillance and response to respiratory infections. Continued research is essential to deepen our understanding of these factors and to develop targeted interventions aimed at reducing the burden of lung diseases in the population. \n",
      "\n",
      "This comprehensive analysis serves as a foundation for further investigation into specific interventions and policies that can mitigate the impact of lung diseases on public health.\n",
      "\n",
      "**Recommendations:**\n",
      "- Implement stricter regulations on air quality and emissions.\n",
      "- Promote smoking cessation programs and awareness campaigns on the dangers of secondhand smoke.\n",
      "- Encourage occupational safety measures to protect workers from harmful exposures.\n",
      "- Advocate for public health initiatives focused on nutrition and physical activity.\n",
      "\n",
      "By addressing these key areas, we can work towards reducing the prevalence and impact of lung diseases in our communities.\n",
      "\n",
      "\u001b[00m\n",
      "\u001b[1m\u001b[95m [2024-11-02 11:01:06][DEBUG]: == Working Agent: Medical Writer\u001b[00m\n",
      "\u001b[1m\u001b[95m [2024-11-02 11:01:06][INFO]: == Starting Task: Create detailed content summarizing the research findings on lung disease causes.\u001b[00m\n",
      "\n",
      "\n",
      "\u001b[1m> Entering new CrewAgentExecutor chain...\u001b[0m\n",
      "\u001b[32;1m\u001b[1;3mI now can give a great answer  \n",
      "Final Answer: \n",
      "\n",
      "**Title: Comprehensive Analysis of the Causes and Risk Factors of Lung Diseases**\n",
      "\n",
      "**Introduction:**\n",
      "Lung diseases encompass a broad range of conditions affecting the lungs, including Chronic Obstructive Pulmonary Disease (COPD), asthma, lung cancer, pulmonary fibrosis, and pneumonia. Understanding the causes and risk factors associated with these diseases is essential for prevention, early detection, and effective management. This report synthesizes current scientific data to elucidate the major causes and risk factors contributing to lung diseases.\n",
      "\n",
      "**Key Findings:**\n",
      "\n",
      "1. **Environmental Factors:**\n",
      "   - **Air Pollution:** \n",
      "     - Exposure to pollutants such as particulate matter (PM), nitrogen dioxide (NO2), and sulfur dioxide (SO2) has been linked to an increased incidence of lung diseases, particularly asthma and COPD. Long-term exposure to high levels of air pollution can exacerbate pre-existing conditions and lead to the development of respiratory issues. Studies indicate that urban areas with high pollution levels see a significant rise in hospital admissions for respiratory ailments.\n",
      "   - **Tobacco Smoke:** \n",
      "     - Smoking is the leading cause of lung diseases, responsible for approximately 85% of lung cancer cases and a significant proportion of COPD cases. The harmful substances in tobacco smoke, including tar and nicotine, damage lung tissues and impair lung function. Secondhand smoke exposure also poses serious health risks, increasing the likelihood of asthma and respiratory infections in non-smokers, especially in children.\n",
      "   - **Occupational Hazards:** \n",
      "     - Certain occupations expose individuals to harmful substances such as asbestos, silica, and coal dust, significantly increasing the risk of lung diseases, including pneumoconiosis and lung cancer. Workers in construction, mining, and manufacturing industries are particularly vulnerable, with studies showing higher incidences of lung disease in these populations compared to the general public.\n",
      "\n",
      "2. **Biological Factors:**\n",
      "   - **Genetics:** \n",
      "     - Genetic predisposition plays a role in an individual's susceptibility to lung diseases. Variants in genes associated with inflammation and immune response can influence the likelihood of developing conditions such as asthma and COPD. Family histories of lung disease can serve as indicators for increased risk.\n",
      "   - **Age and Gender:** \n",
      "     - Aging is a significant risk factor for lung diseases due to the natural decline in lung function over time. Additionally, gender differences exist; for instance, men historically have higher rates of lung cancer, while women are increasingly affected, particularly non-smokers, suggesting a need for further investigation into gender-specific risk factors.\n",
      "\n",
      "3. **Lifestyle Factors:**\n",
      "   - **Diet and Nutrition:** \n",
      "     - Poor diet, characterized by low intake of fruits and vegetables, has been associated with an increased risk of respiratory diseases. Antioxidants found in these foods may help protect lung tissue from damage. Studies suggest that diets rich in vitamins C and E can lower the risk of developing lung disease.\n",
      "   - **Physical Inactivity:** \n",
      "     - Sedentary lifestyles contribute to obesity, which is a known risk factor for various lung conditions, including obstructive sleep apnea and asthma. Regular physical activity can enhance lung function and overall respiratory health.\n",
      "\n",
      "4. **Infectious Agents:**\n",
      "   - **Viruses and Bacteria:** \n",
      "     - Respiratory infections from pathogens such as influenza, pneumonia-causing bacteria (e.g., Streptococcus pneumoniae), and viral infections (e.g., COVID-19) can lead to acute and chronic lung diseases. Severe infections can cause long-term lung damage, particularly in vulnerable populations, leading to complications such as chronic lung disease or worsening of pre-existing conditions.\n",
      "\n",
      "5. **Comorbidities:**\n",
      "   - **Chronic Conditions:** \n",
      "     - The presence of comorbidities such as obesity, diabetes, and cardiovascular diseases can exacerbate lung diseases and complicate their management. These conditions may contribute to inflammation and reduced lung function, leading to worse health outcomes. Effective management of comorbidities is crucial in improving lung health.\n",
      "\n",
      "**Conclusion:**\n",
      "The causes and risk factors of lung diseases are multifaceted, involving a complex interplay between environmental, biological, lifestyle, infectious, and comorbid factors. Effective public health strategies must focus on reducing exposure to known risk factors, promoting healthy lifestyles, and enhancing surveillance and response to respiratory infections. Continued research is essential to deepen our understanding of these factors and to develop targeted interventions aimed at reducing the burden of lung diseases in the population.\n",
      "\n",
      "This comprehensive analysis serves as a foundation for further investigation into specific interventions and policies that can mitigate the impact of lung diseases on public health.\n",
      "\n",
      "**Recommendations:**\n",
      "- Implement stricter regulations on air quality and emissions to reduce pollution levels.\n",
      "- Promote smoking cessation programs and awareness campaigns on the dangers of secondhand smoke, especially targeting vulnerable populations such as children and pregnant women.\n",
      "- Encourage occupational safety measures to protect workers from harmful exposures, including regular health screenings and protective equipment.\n",
      "- Advocate for public health initiatives focused on nutrition and physical activity, fostering a culture of health and wellness in communities.\n",
      "\n",
      "By addressing these key areas, we can work towards reducing the prevalence and impact of lung diseases in our communities.\u001b[0m\n",
      "\n",
      "\u001b[1m> Finished chain.\u001b[0m\n",
      "\u001b[1m\u001b[92m [2024-11-02 11:01:18][DEBUG]: == [Medical Writer] Task output: **Title: Comprehensive Analysis of the Causes and Risk Factors of Lung Diseases**\n",
      "\n",
      "**Introduction:**\n",
      "Lung diseases encompass a broad range of conditions affecting the lungs, including Chronic Obstructive Pulmonary Disease (COPD), asthma, lung cancer, pulmonary fibrosis, and pneumonia. Understanding the causes and risk factors associated with these diseases is essential for prevention, early detection, and effective management. This report synthesizes current scientific data to elucidate the major causes and risk factors contributing to lung diseases.\n",
      "\n",
      "**Key Findings:**\n",
      "\n",
      "1. **Environmental Factors:**\n",
      "   - **Air Pollution:** \n",
      "     - Exposure to pollutants such as particulate matter (PM), nitrogen dioxide (NO2), and sulfur dioxide (SO2) has been linked to an increased incidence of lung diseases, particularly asthma and COPD. Long-term exposure to high levels of air pollution can exacerbate pre-existing conditions and lead to the development of respiratory issues. Studies indicate that urban areas with high pollution levels see a significant rise in hospital admissions for respiratory ailments.\n",
      "   - **Tobacco Smoke:** \n",
      "     - Smoking is the leading cause of lung diseases, responsible for approximately 85% of lung cancer cases and a significant proportion of COPD cases. The harmful substances in tobacco smoke, including tar and nicotine, damage lung tissues and impair lung function. Secondhand smoke exposure also poses serious health risks, increasing the likelihood of asthma and respiratory infections in non-smokers, especially in children.\n",
      "   - **Occupational Hazards:** \n",
      "     - Certain occupations expose individuals to harmful substances such as asbestos, silica, and coal dust, significantly increasing the risk of lung diseases, including pneumoconiosis and lung cancer. Workers in construction, mining, and manufacturing industries are particularly vulnerable, with studies showing higher incidences of lung disease in these populations compared to the general public.\n",
      "\n",
      "2. **Biological Factors:**\n",
      "   - **Genetics:** \n",
      "     - Genetic predisposition plays a role in an individual's susceptibility to lung diseases. Variants in genes associated with inflammation and immune response can influence the likelihood of developing conditions such as asthma and COPD. Family histories of lung disease can serve as indicators for increased risk.\n",
      "   - **Age and Gender:** \n",
      "     - Aging is a significant risk factor for lung diseases due to the natural decline in lung function over time. Additionally, gender differences exist; for instance, men historically have higher rates of lung cancer, while women are increasingly affected, particularly non-smokers, suggesting a need for further investigation into gender-specific risk factors.\n",
      "\n",
      "3. **Lifestyle Factors:**\n",
      "   - **Diet and Nutrition:** \n",
      "     - Poor diet, characterized by low intake of fruits and vegetables, has been associated with an increased risk of respiratory diseases. Antioxidants found in these foods may help protect lung tissue from damage. Studies suggest that diets rich in vitamins C and E can lower the risk of developing lung disease.\n",
      "   - **Physical Inactivity:** \n",
      "     - Sedentary lifestyles contribute to obesity, which is a known risk factor for various lung conditions, including obstructive sleep apnea and asthma. Regular physical activity can enhance lung function and overall respiratory health.\n",
      "\n",
      "4. **Infectious Agents:**\n",
      "   - **Viruses and Bacteria:** \n",
      "     - Respiratory infections from pathogens such as influenza, pneumonia-causing bacteria (e.g., Streptococcus pneumoniae), and viral infections (e.g., COVID-19) can lead to acute and chronic lung diseases. Severe infections can cause long-term lung damage, particularly in vulnerable populations, leading to complications such as chronic lung disease or worsening of pre-existing conditions.\n",
      "\n",
      "5. **Comorbidities:**\n",
      "   - **Chronic Conditions:** \n",
      "     - The presence of comorbidities such as obesity, diabetes, and cardiovascular diseases can exacerbate lung diseases and complicate their management. These conditions may contribute to inflammation and reduced lung function, leading to worse health outcomes. Effective management of comorbidities is crucial in improving lung health.\n",
      "\n",
      "**Conclusion:**\n",
      "The causes and risk factors of lung diseases are multifaceted, involving a complex interplay between environmental, biological, lifestyle, infectious, and comorbid factors. Effective public health strategies must focus on reducing exposure to known risk factors, promoting healthy lifestyles, and enhancing surveillance and response to respiratory infections. Continued research is essential to deepen our understanding of these factors and to develop targeted interventions aimed at reducing the burden of lung diseases in the population.\n",
      "\n",
      "This comprehensive analysis serves as a foundation for further investigation into specific interventions and policies that can mitigate the impact of lung diseases on public health.\n",
      "\n",
      "**Recommendations:**\n",
      "- Implement stricter regulations on air quality and emissions to reduce pollution levels.\n",
      "- Promote smoking cessation programs and awareness campaigns on the dangers of secondhand smoke, especially targeting vulnerable populations such as children and pregnant women.\n",
      "- Encourage occupational safety measures to protect workers from harmful exposures, including regular health screenings and protective equipment.\n",
      "- Advocate for public health initiatives focused on nutrition and physical activity, fostering a culture of health and wellness in communities.\n",
      "\n",
      "By addressing these key areas, we can work towards reducing the prevalence and impact of lung diseases in our communities.\n",
      "\n",
      "\u001b[00m\n",
      "\u001b[1m\u001b[95m [2024-11-02 11:01:18][DEBUG]: == Working Agent: Editor\u001b[00m\n",
      "\u001b[1m\u001b[95m [2024-11-02 11:01:18][INFO]: == Starting Task: Edit and refine the compiled content on lung disease causes for accuracy and coherence.\u001b[00m\n",
      "\n",
      "\n",
      "\u001b[1m> Entering new CrewAgentExecutor chain...\u001b[0m\n",
      "\u001b[32;1m\u001b[1;3mI now can give a great answer  \n",
      "Final Answer: \n",
      "\n",
      "**Title: Comprehensive Analysis of the Causes and Risk Factors of Lung Diseases**\n",
      "\n",
      "**Introduction:**\n",
      "Lung diseases encompass a broad range of conditions affecting the lungs, including Chronic Obstructive Pulmonary Disease (COPD), asthma, lung cancer, pulmonary fibrosis, and pneumonia. Understanding the causes and risk factors associated with these diseases is essential for prevention, early detection, and effective management. This report synthesizes current scientific data to elucidate the major causes and risk factors contributing to lung diseases.\n",
      "\n",
      "**Key Findings:**\n",
      "\n",
      "1. **Environmental Factors:**\n",
      "   - **Air Pollution:** \n",
      "     - Exposure to pollutants such as particulate matter (PM), nitrogen dioxide (NO2), and sulfur dioxide (SO2) has been linked to an increased incidence of lung diseases, particularly asthma and COPD. Long-term exposure to high levels of air pollution can exacerbate pre-existing conditions and lead to the development of respiratory issues. Studies indicate that urban areas with high pollution levels see a significant rise in hospital admissions for respiratory ailments.\n",
      "   - **Tobacco Smoke:** \n",
      "     - Smoking is the leading cause of lung diseases, responsible for approximately 85% of lung cancer cases and a significant proportion of COPD cases. The harmful substances in tobacco smoke, including tar and nicotine, damage lung tissues and impair lung function. Secondhand smoke exposure also poses serious health risks, increasing the likelihood of asthma and respiratory infections in non-smokers, especially in children.\n",
      "   - **Occupational Hazards:** \n",
      "     - Certain occupations expose individuals to harmful substances such as asbestos, silica, and coal dust, significantly increasing the risk of lung diseases, including pneumoconiosis and lung cancer. Workers in construction, mining, and manufacturing industries are particularly vulnerable, with studies showing higher incidences of lung disease in these populations compared to the general public.\n",
      "\n",
      "2. **Biological Factors:**\n",
      "   - **Genetics:** \n",
      "     - Genetic predisposition plays a role in an individual's susceptibility to lung diseases. Variants in genes associated with inflammation and immune response can influence the likelihood of developing conditions such as asthma and COPD. Family histories of lung disease can serve as indicators for increased risk.\n",
      "   - **Age and Gender:** \n",
      "     - Aging is a significant risk factor for lung diseases due to the natural decline in lung function over time. Additionally, gender differences exist; for instance, men historically have higher rates of lung cancer, while women are increasingly affected, particularly non-smokers, suggesting a need for further investigation into gender-specific risk factors.\n",
      "\n",
      "3. **Lifestyle Factors:**\n",
      "   - **Diet and Nutrition:** \n",
      "     - Poor diet, characterized by low intake of fruits and vegetables, has been associated with an increased risk of respiratory diseases. Antioxidants found in these foods may help protect lung tissue from damage. Studies suggest that diets rich in vitamins C and E can lower the risk of developing lung disease.\n",
      "   - **Physical Inactivity:** \n",
      "     - Sedentary lifestyles contribute to obesity, which is a known risk factor for various lung conditions, including obstructive sleep apnea and asthma. Regular physical activity can enhance lung function and overall respiratory health.\n",
      "\n",
      "4. **Infectious Agents:**\n",
      "   - **Viruses and Bacteria:** \n",
      "     - Respiratory infections from pathogens such as influenza, pneumonia-causing bacteria (e.g., Streptococcus pneumoniae), and viral infections (e.g., COVID-19) can lead to acute and chronic lung diseases. Severe infections can cause long-term lung damage, particularly in vulnerable populations, leading to complications such as chronic lung disease or worsening of pre-existing conditions.\n",
      "\n",
      "5. **Comorbidities:**\n",
      "   - **Chronic Conditions:** \n",
      "     - The presence of comorbidities such as obesity, diabetes, and cardiovascular diseases can exacerbate lung diseases and complicate their management. These conditions may contribute to inflammation and reduced lung function, leading to worse health outcomes. Effective management of comorbidities is crucial in improving lung health.\n",
      "\n",
      "**Conclusion:**\n",
      "The causes and risk factors of lung diseases are multifaceted, involving a complex interplay between environmental, biological, lifestyle, infectious, and comorbid factors. Effective public health strategies must focus on reducing exposure to known risk factors, promoting healthy lifestyles, and enhancing surveillance and response to respiratory infections. Continued research is essential to deepen our understanding of these factors and to develop targeted interventions aimed at reducing the burden of lung diseases in the population.\n",
      "\n",
      "This comprehensive analysis serves as a foundation for further investigation into specific interventions and policies that can mitigate the impact of lung diseases on public health.\n",
      "\n",
      "**Recommendations:**\n",
      "- Implement stricter regulations on air quality and emissions to reduce pollution levels.\n",
      "- Promote smoking cessation programs and awareness campaigns on the dangers of secondhand smoke, especially targeting vulnerable populations such as children and pregnant women.\n",
      "- Encourage occupational safety measures to protect workers from harmful exposures, including regular health screenings and protective equipment.\n",
      "- Advocate for public health initiatives focused on nutrition and physical activity, fostering a culture of health and wellness in communities.\n",
      "\n",
      "By addressing these key areas, we can work towards reducing the prevalence and impact of lung diseases in our communities.\u001b[0m\n",
      "\n",
      "\u001b[1m> Finished chain.\u001b[0m\n",
      "\u001b[1m\u001b[92m [2024-11-02 11:01:29][DEBUG]: == [Editor] Task output: **Title: Comprehensive Analysis of the Causes and Risk Factors of Lung Diseases**\n",
      "\n",
      "**Introduction:**\n",
      "Lung diseases encompass a broad range of conditions affecting the lungs, including Chronic Obstructive Pulmonary Disease (COPD), asthma, lung cancer, pulmonary fibrosis, and pneumonia. Understanding the causes and risk factors associated with these diseases is essential for prevention, early detection, and effective management. This report synthesizes current scientific data to elucidate the major causes and risk factors contributing to lung diseases.\n",
      "\n",
      "**Key Findings:**\n",
      "\n",
      "1. **Environmental Factors:**\n",
      "   - **Air Pollution:** \n",
      "     - Exposure to pollutants such as particulate matter (PM), nitrogen dioxide (NO2), and sulfur dioxide (SO2) has been linked to an increased incidence of lung diseases, particularly asthma and COPD. Long-term exposure to high levels of air pollution can exacerbate pre-existing conditions and lead to the development of respiratory issues. Studies indicate that urban areas with high pollution levels see a significant rise in hospital admissions for respiratory ailments.\n",
      "   - **Tobacco Smoke:** \n",
      "     - Smoking is the leading cause of lung diseases, responsible for approximately 85% of lung cancer cases and a significant proportion of COPD cases. The harmful substances in tobacco smoke, including tar and nicotine, damage lung tissues and impair lung function. Secondhand smoke exposure also poses serious health risks, increasing the likelihood of asthma and respiratory infections in non-smokers, especially in children.\n",
      "   - **Occupational Hazards:** \n",
      "     - Certain occupations expose individuals to harmful substances such as asbestos, silica, and coal dust, significantly increasing the risk of lung diseases, including pneumoconiosis and lung cancer. Workers in construction, mining, and manufacturing industries are particularly vulnerable, with studies showing higher incidences of lung disease in these populations compared to the general public.\n",
      "\n",
      "2. **Biological Factors:**\n",
      "   - **Genetics:** \n",
      "     - Genetic predisposition plays a role in an individual's susceptibility to lung diseases. Variants in genes associated with inflammation and immune response can influence the likelihood of developing conditions such as asthma and COPD. Family histories of lung disease can serve as indicators for increased risk.\n",
      "   - **Age and Gender:** \n",
      "     - Aging is a significant risk factor for lung diseases due to the natural decline in lung function over time. Additionally, gender differences exist; for instance, men historically have higher rates of lung cancer, while women are increasingly affected, particularly non-smokers, suggesting a need for further investigation into gender-specific risk factors.\n",
      "\n",
      "3. **Lifestyle Factors:**\n",
      "   - **Diet and Nutrition:** \n",
      "     - Poor diet, characterized by low intake of fruits and vegetables, has been associated with an increased risk of respiratory diseases. Antioxidants found in these foods may help protect lung tissue from damage. Studies suggest that diets rich in vitamins C and E can lower the risk of developing lung disease.\n",
      "   - **Physical Inactivity:** \n",
      "     - Sedentary lifestyles contribute to obesity, which is a known risk factor for various lung conditions, including obstructive sleep apnea and asthma. Regular physical activity can enhance lung function and overall respiratory health.\n",
      "\n",
      "4. **Infectious Agents:**\n",
      "   - **Viruses and Bacteria:** \n",
      "     - Respiratory infections from pathogens such as influenza, pneumonia-causing bacteria (e.g., Streptococcus pneumoniae), and viral infections (e.g., COVID-19) can lead to acute and chronic lung diseases. Severe infections can cause long-term lung damage, particularly in vulnerable populations, leading to complications such as chronic lung disease or worsening of pre-existing conditions.\n",
      "\n",
      "5. **Comorbidities:**\n",
      "   - **Chronic Conditions:** \n",
      "     - The presence of comorbidities such as obesity, diabetes, and cardiovascular diseases can exacerbate lung diseases and complicate their management. These conditions may contribute to inflammation and reduced lung function, leading to worse health outcomes. Effective management of comorbidities is crucial in improving lung health.\n",
      "\n",
      "**Conclusion:**\n",
      "The causes and risk factors of lung diseases are multifaceted, involving a complex interplay between environmental, biological, lifestyle, infectious, and comorbid factors. Effective public health strategies must focus on reducing exposure to known risk factors, promoting healthy lifestyles, and enhancing surveillance and response to respiratory infections. Continued research is essential to deepen our understanding of these factors and to develop targeted interventions aimed at reducing the burden of lung diseases in the population.\n",
      "\n",
      "This comprehensive analysis serves as a foundation for further investigation into specific interventions and policies that can mitigate the impact of lung diseases on public health.\n",
      "\n",
      "**Recommendations:**\n",
      "- Implement stricter regulations on air quality and emissions to reduce pollution levels.\n",
      "- Promote smoking cessation programs and awareness campaigns on the dangers of secondhand smoke, especially targeting vulnerable populations such as children and pregnant women.\n",
      "- Encourage occupational safety measures to protect workers from harmful exposures, including regular health screenings and protective equipment.\n",
      "- Advocate for public health initiatives focused on nutrition and physical activity, fostering a culture of health and wellness in communities.\n",
      "\n",
      "By addressing these key areas, we can work towards reducing the prevalence and impact of lung diseases in our communities.\n",
      "\n",
      "\u001b[00m\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">### Task Output ###\n",
       "**Title: Comprehensive Analysis of the Causes and Risk Factors of Lung Diseases**\n",
       "\n",
       "**Introduction:**\n",
       "Lung diseases encompass a broad range of conditions affecting the lungs, including Chronic Obstructive Pulmonary \n",
       "Disease <span style=\"font-weight: bold\">(</span>COPD<span style=\"font-weight: bold\">)</span>, asthma, lung cancer, pulmonary fibrosis, and pneumonia. Understanding the causes and risk factors \n",
       "associated with these diseases is essential for prevention, early detection, and effective management. This report \n",
       "synthesizes current scientific data to elucidate the major causes and risk factors contributing to lung diseases.\n",
       "\n",
       "**Key Findings:**\n",
       "\n",
       "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span>. **Environmental Factors:**\n",
       "   - **Air Pollution:** \n",
       "     - Exposure to pollutants such as particulate matter <span style=\"font-weight: bold\">(</span>PM<span style=\"font-weight: bold\">)</span>, nitrogen dioxide <span style=\"font-weight: bold\">(</span>NO2<span style=\"font-weight: bold\">)</span>, and sulfur dioxide <span style=\"font-weight: bold\">(</span>SO2<span style=\"font-weight: bold\">)</span> has\n",
       "been linked to an increased incidence of lung diseases, particularly asthma and COPD. Long-term exposure to high \n",
       "levels of air pollution can exacerbate pre-existing conditions and lead to the development of respiratory issues. \n",
       "Studies indicate that urban areas with high pollution levels see a significant rise in hospital admissions for \n",
       "respiratory ailments.\n",
       "   - **Tobacco Smoke:** \n",
       "     - Smoking is the leading cause of lung diseases, responsible for approximately <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">85</span>% of lung cancer cases and a \n",
       "significant proportion of COPD cases. The harmful substances in tobacco smoke, including tar and nicotine, damage \n",
       "lung tissues and impair lung function. Secondhand smoke exposure also poses serious health risks, increasing the \n",
       "likelihood of asthma and respiratory infections in non-smokers, especially in children.\n",
       "   - **Occupational Hazards:** \n",
       "     - Certain occupations expose individuals to harmful substances such as asbestos, silica, and coal dust, \n",
       "significantly increasing the risk of lung diseases, including pneumoconiosis and lung cancer. Workers in \n",
       "construction, mining, and manufacturing industries are particularly vulnerable, with studies showing higher \n",
       "incidences of lung disease in these populations compared to the general public.\n",
       "\n",
       "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span>. **Biological Factors:**\n",
       "   - **Genetics:** \n",
       "     - Genetic predisposition plays a role in an individual's susceptibility to lung diseases. Variants in genes \n",
       "associated with inflammation and immune response can influence the likelihood of developing conditions such as \n",
       "asthma and COPD. Family histories of lung disease can serve as indicators for increased risk.\n",
       "   - **Age and Gender:** \n",
       "     - Aging is a significant risk factor for lung diseases due to the natural decline in lung function over time. \n",
       "Additionally, gender differences exist; for instance, men historically have higher rates of lung cancer, while \n",
       "women are increasingly affected, particularly non-smokers, suggesting a need for further investigation into \n",
       "gender-specific risk factors.\n",
       "\n",
       "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span>. **Lifestyle Factors:**\n",
       "   - **Diet and Nutrition:** \n",
       "     - Poor diet, characterized by low intake of fruits and vegetables, has been associated with an increased risk \n",
       "of respiratory diseases. Antioxidants found in these foods may help protect lung tissue from damage. Studies \n",
       "suggest that diets rich in vitamins C and E can lower the risk of developing lung disease.\n",
       "   - **Physical Inactivity:** \n",
       "     - Sedentary lifestyles contribute to obesity, which is a known risk factor for various lung conditions, \n",
       "including obstructive sleep apnea and asthma. Regular physical activity can enhance lung function and overall \n",
       "respiratory health.\n",
       "\n",
       "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">4</span>. **Infectious Agents:**\n",
       "   - **Viruses and Bacteria:** \n",
       "     - Respiratory infections from pathogens such as influenza, pneumonia-causing bacteria <span style=\"font-weight: bold\">(</span>e.g., Streptococcus \n",
       "pneumoniae<span style=\"font-weight: bold\">)</span>, and viral infections <span style=\"font-weight: bold\">(</span>e.g., COVID-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">19</span><span style=\"font-weight: bold\">)</span> can lead to acute and chronic lung diseases. Severe infections \n",
       "can cause long-term lung damage, particularly in vulnerable populations, leading to complications such as chronic \n",
       "lung disease or worsening of pre-existing conditions.\n",
       "\n",
       "<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">5</span>. **Comorbidities:**\n",
       "   - **Chronic Conditions:** \n",
       "     - The presence of comorbidities such as obesity, diabetes, and cardiovascular diseases can exacerbate lung \n",
       "diseases and complicate their management. These conditions may contribute to inflammation and reduced lung \n",
       "function, leading to worse health outcomes. Effective management of comorbidities is crucial in improving lung \n",
       "health.\n",
       "\n",
       "**Conclusion:**\n",
       "The causes and risk factors of lung diseases are multifaceted, involving a complex interplay between environmental,\n",
       "biological, lifestyle, infectious, and comorbid factors. Effective public health strategies must focus on reducing \n",
       "exposure to known risk factors, promoting healthy lifestyles, and enhancing surveillance and response to \n",
       "respiratory infections. Continued research is essential to deepen our understanding of these factors and to develop\n",
       "targeted interventions aimed at reducing the burden of lung diseases in the population.\n",
       "\n",
       "This comprehensive analysis serves as a foundation for further investigation into specific interventions and \n",
       "policies that can mitigate the impact of lung diseases on public health.\n",
       "\n",
       "**Recommendations:**\n",
       "- Implement stricter regulations on air quality and emissions to reduce pollution levels.\n",
       "- Promote smoking cessation programs and awareness campaigns on the dangers of secondhand smoke, especially \n",
       "targeting vulnerable populations such as children and pregnant women.\n",
       "- Encourage occupational safety measures to protect workers from harmful exposures, including regular health \n",
       "screenings and protective equipment.\n",
       "- Advocate for public health initiatives focused on nutrition and physical activity, fostering a culture of health \n",
       "and wellness in communities.\n",
       "\n",
       "By addressing these key areas, we can work towards reducing the prevalence and impact of lung diseases in our \n",
       "communities.\n",
       "</pre>\n"
      ],
      "text/plain": [
       "### Task Output ###\n",
       "**Title: Comprehensive Analysis of the Causes and Risk Factors of Lung Diseases**\n",
       "\n",
       "**Introduction:**\n",
       "Lung diseases encompass a broad range of conditions affecting the lungs, including Chronic Obstructive Pulmonary \n",
       "Disease \u001b[1m(\u001b[0mCOPD\u001b[1m)\u001b[0m, asthma, lung cancer, pulmonary fibrosis, and pneumonia. Understanding the causes and risk factors \n",
       "associated with these diseases is essential for prevention, early detection, and effective management. This report \n",
       "synthesizes current scientific data to elucidate the major causes and risk factors contributing to lung diseases.\n",
       "\n",
       "**Key Findings:**\n",
       "\n",
       "\u001b[1;36m1\u001b[0m. **Environmental Factors:**\n",
       "   - **Air Pollution:** \n",
       "     - Exposure to pollutants such as particulate matter \u001b[1m(\u001b[0mPM\u001b[1m)\u001b[0m, nitrogen dioxide \u001b[1m(\u001b[0mNO2\u001b[1m)\u001b[0m, and sulfur dioxide \u001b[1m(\u001b[0mSO2\u001b[1m)\u001b[0m has\n",
       "been linked to an increased incidence of lung diseases, particularly asthma and COPD. Long-term exposure to high \n",
       "levels of air pollution can exacerbate pre-existing conditions and lead to the development of respiratory issues. \n",
       "Studies indicate that urban areas with high pollution levels see a significant rise in hospital admissions for \n",
       "respiratory ailments.\n",
       "   - **Tobacco Smoke:** \n",
       "     - Smoking is the leading cause of lung diseases, responsible for approximately \u001b[1;36m85\u001b[0m% of lung cancer cases and a \n",
       "significant proportion of COPD cases. The harmful substances in tobacco smoke, including tar and nicotine, damage \n",
       "lung tissues and impair lung function. Secondhand smoke exposure also poses serious health risks, increasing the \n",
       "likelihood of asthma and respiratory infections in non-smokers, especially in children.\n",
       "   - **Occupational Hazards:** \n",
       "     - Certain occupations expose individuals to harmful substances such as asbestos, silica, and coal dust, \n",
       "significantly increasing the risk of lung diseases, including pneumoconiosis and lung cancer. Workers in \n",
       "construction, mining, and manufacturing industries are particularly vulnerable, with studies showing higher \n",
       "incidences of lung disease in these populations compared to the general public.\n",
       "\n",
       "\u001b[1;36m2\u001b[0m. **Biological Factors:**\n",
       "   - **Genetics:** \n",
       "     - Genetic predisposition plays a role in an individual's susceptibility to lung diseases. Variants in genes \n",
       "associated with inflammation and immune response can influence the likelihood of developing conditions such as \n",
       "asthma and COPD. Family histories of lung disease can serve as indicators for increased risk.\n",
       "   - **Age and Gender:** \n",
       "     - Aging is a significant risk factor for lung diseases due to the natural decline in lung function over time. \n",
       "Additionally, gender differences exist; for instance, men historically have higher rates of lung cancer, while \n",
       "women are increasingly affected, particularly non-smokers, suggesting a need for further investigation into \n",
       "gender-specific risk factors.\n",
       "\n",
       "\u001b[1;36m3\u001b[0m. **Lifestyle Factors:**\n",
       "   - **Diet and Nutrition:** \n",
       "     - Poor diet, characterized by low intake of fruits and vegetables, has been associated with an increased risk \n",
       "of respiratory diseases. Antioxidants found in these foods may help protect lung tissue from damage. Studies \n",
       "suggest that diets rich in vitamins C and E can lower the risk of developing lung disease.\n",
       "   - **Physical Inactivity:** \n",
       "     - Sedentary lifestyles contribute to obesity, which is a known risk factor for various lung conditions, \n",
       "including obstructive sleep apnea and asthma. Regular physical activity can enhance lung function and overall \n",
       "respiratory health.\n",
       "\n",
       "\u001b[1;36m4\u001b[0m. **Infectious Agents:**\n",
       "   - **Viruses and Bacteria:** \n",
       "     - Respiratory infections from pathogens such as influenza, pneumonia-causing bacteria \u001b[1m(\u001b[0me.g., Streptococcus \n",
       "pneumoniae\u001b[1m)\u001b[0m, and viral infections \u001b[1m(\u001b[0me.g., COVID-\u001b[1;36m19\u001b[0m\u001b[1m)\u001b[0m can lead to acute and chronic lung diseases. Severe infections \n",
       "can cause long-term lung damage, particularly in vulnerable populations, leading to complications such as chronic \n",
       "lung disease or worsening of pre-existing conditions.\n",
       "\n",
       "\u001b[1;36m5\u001b[0m. **Comorbidities:**\n",
       "   - **Chronic Conditions:** \n",
       "     - The presence of comorbidities such as obesity, diabetes, and cardiovascular diseases can exacerbate lung \n",
       "diseases and complicate their management. These conditions may contribute to inflammation and reduced lung \n",
       "function, leading to worse health outcomes. Effective management of comorbidities is crucial in improving lung \n",
       "health.\n",
       "\n",
       "**Conclusion:**\n",
       "The causes and risk factors of lung diseases are multifaceted, involving a complex interplay between environmental,\n",
       "biological, lifestyle, infectious, and comorbid factors. Effective public health strategies must focus on reducing \n",
       "exposure to known risk factors, promoting healthy lifestyles, and enhancing surveillance and response to \n",
       "respiratory infections. Continued research is essential to deepen our understanding of these factors and to develop\n",
       "targeted interventions aimed at reducing the burden of lung diseases in the population.\n",
       "\n",
       "This comprehensive analysis serves as a foundation for further investigation into specific interventions and \n",
       "policies that can mitigate the impact of lung diseases on public health.\n",
       "\n",
       "**Recommendations:**\n",
       "- Implement stricter regulations on air quality and emissions to reduce pollution levels.\n",
       "- Promote smoking cessation programs and awareness campaigns on the dangers of secondhand smoke, especially \n",
       "targeting vulnerable populations such as children and pregnant women.\n",
       "- Encourage occupational safety measures to protect workers from harmful exposures, including regular health \n",
       "screenings and protective equipment.\n",
       "- Advocate for public health initiatives focused on nutrition and physical activity, fostering a culture of health \n",
       "and wellness in communities.\n",
       "\n",
       "By addressing these key areas, we can work towards reducing the prevalence and impact of lung diseases in our \n",
       "communities.\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "from praisonai import PraisonAI\n",
    "from google.colab import userdata\n",
    "\n",
    "# Create a PraisonAI instance with the agent_yaml content\n",
    "praisonai = PraisonAI(agent_yaml=agent_yaml, tools=[RedditSearchRun])\n",
    "\n",
    "# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
    "os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
    "os.environ[\"OPENAI_MODEL_NAME\"] = \"gpt-5-nano\"\n",
    "\n",
    "# Run PraisonAI\n",
    "result = praisonai.run()\n",
    "\n",
    "# Print the result\n",
    "print(result) # 2/10"
   ]
  }
 ],
 "metadata": {
  "colab": {
   "provenance": []
  },
  "kernelspec": {
   "display_name": "Python 3",
   "name": "python3"
  },
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
